<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Types of measurements - Zend Framework Manual</title>

    <link href="../css/shCore.css" rel="stylesheet" type="text/css" />
    <link href="../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
    <link href="../css/styles.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Zend Framework</h1>
<h2>Programmer's Reference Guide</h2>
<ul>
    <li><a href="../en/zend.measure.types.html">Inglês (English)</a></li>
    <li><a href="../pt-br/zend.measure.types.html">Português Brasileiro (Brazilian Portuguese)</a></li>
</ul>
<table width="100%">
    <tr valign="top">
        <td width="85%">
            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.measure.edit.html">Manipulating Measurements</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.measure.html">Zend_Measure</a></span><br />
                        <span class="home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.memory.html">Zend_Memory</a></div>
                    </td>
                </tr>
            </table>
<hr />
<div id="zend.measure.types" class="section"><div class="info"><h1 class="title">Types of measurements</h1></div>
    

    <p class="para">
        All supported measurement types are listed below, each with an example of the standard usage
        for such measurements.
    </p>

    <table id="zend.measure.types.table-1" class="doctable table"><div class="info"><caption><b>List of measurement types</b></caption></div>
        

        
            <thead valign="middle">
                <tr valign="middle">
                    <th>Typ</th>
                    <th>Class</th>
                    <th>Standardunit</th>
                    <th>Description</th>
                </tr>

            </thead>


            <tbody valign="middle" class="tbody">
                <tr valign="middle">
                    <td align="left">Acceleration</td>
                    <td align="left">Zend_Measure_Acceleration</td>
                    <td align="left">Meter per square second | <code class="code">m/s²</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Acceleration</span> covers the
                        physical factor of acceleration.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Angle</td>
                    <td align="left">Zend_Measure_Angle</td>
                    <td align="left">Radiant | <code class="code">rad</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Angle</span> covers angular dimensions.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Area</td>
                    <td align="left">Zend_Measure_Area</td>
                    <td align="left">Square meter | <code class="code">m²</code></td>
                    <td align="left"><span class="classname">Zend_Measure_Area</span> covers square measures.</td>
                </tr>


                <tr valign="middle">
                    <td align="left">Binary</td>
                    <td align="left">Zend_Measure_Binary</td>
                    <td align="left">Byte | <code class="code">b</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Binary</span> covers binary conversions.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Capacitance</td>
                    <td align="left">Zend_Measure_Capacitance</td>
                    <td align="left">Farad | <code class="code">F</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Capacitance</span> covers physical factor of
                        capacitance.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Cooking volumes</td>
                    <td align="left">Zend_Measure_Cooking_Volume</td>
                    <td align="left">Cubic meter | <code class="code">m³</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Cooking_Volume</span> covers volumes
                        which are used for cooking or written in cookbooks.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Cooking weights</td>
                    <td align="left">Zend_Measure_Cooking_Weight</td>
                    <td align="left">Gram | <code class="code">g</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Cooking_Weight</span> covers the weights
                        which are used for cooking or written in cookbooks.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Current</td>
                    <td align="left">Zend_Measure_Current</td>
                    <td align="left">Ampere | <code class="code">A</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Current</span> covers the physical factor of
                        current.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Density</td>
                    <td align="left">Zend_Measure_Density</td>
                    <td align="left">Kilogram per cubic meter | <code class="code">kg/m³</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Density</span> covers the physical factor of
                        density.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Energy</td>
                    <td align="left">Zend_Measure_Energy</td>
                    <td align="left">Joule | <code class="code">J</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Energy</span> covers the physical factor of
                        energy.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Force</td>
                    <td align="left">Zend_Measure_Force</td>
                    <td align="left">Newton | <code class="code">N</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Force</span> covers the physical factor of
                        force.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Flow (mass)</td>
                    <td align="left">Zend_Measure_Flow_Mass</td>
                    <td align="left">Kilogram per second | <code class="code">kg/s</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Flow_Mass</span> covers the physical factor of
                        flow rate. The weight of the flowing mass is used as reference point within
                        this class.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Flow (mole)</td>
                    <td align="left">Zend_Measure_Flow_Mole</td>
                    <td align="left">Mole per second | <code class="code">mol/s</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Flow_Mole</span> covers the physical factor of
                        flow rate. The density of the flowing mass is used as reference point within
                        this class.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Flow (volume)</td>
                    <td align="left">Zend_Measure_Flow_Volume</td>
                    <td align="left">Cubic meter per second | <code class="code">m³/s</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Flow_Volume</span> covers the physical factor
                        of flow rate. The volume of the flowing mass is used as reference point
                        within this class.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Frequency</td>
                    <td align="left">Zend_Measure_Frequency</td>
                    <td align="left">Hertz | <code class="code">Hz</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Frequency</span> covers the physical factor of
                        frequency.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Illumination</td>
                    <td align="left">Zend_Measure_Illumination</td>
                    <td align="left">Lux | <code class="code">lx</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Illumination</span> covers the physical factor
                        of light density.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Length</td>
                    <td align="left">Zend_Measure_Length</td>
                    <td align="left">Meter | <code class="code">m</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Length</span> covers the physical factor of
                        length.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Lightness</td>
                    <td align="left">Zend_Measure_Lightness</td>
                    <td align="left">Candela per square meter | <code class="code">cd/m²</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Ligntness</span> covers the physical factor of
                        light energy.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Number</td>
                    <td align="left">Zend_Measure_Number</td>
                    <td align="left">Decimal | <code class="code">(10)</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Number</span> converts between number formats.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Power</td>
                    <td align="left">Zend_Measure_Power</td>
                    <td align="left">Watt | <code class="code">W</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Power</span> covers the physical factor of
                        power.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Pressure</td>
                    <td align="left">Zend_Measure_Pressure</td>
                    <td align="left">Newton per square meter | <code class="code">N/m²</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Pressure</span> covers the physical factor of
                        pressure.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Speed</td>
                    <td align="left">Zend_Measure_Speed</td>
                    <td align="left">Meter per second | <code class="code">m/s</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Speed</span> covers the physical factor of
                        speed.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Temperature</td>
                    <td align="left">Zend_Measure_Temperature</td>
                    <td align="left">Kelvin | <code class="code">K</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Temperature</span> covers the physical factor
                        of temperature.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Time</td>
                    <td align="left">Zend_Measure_Time</td>
                    <td align="left">Second | <code class="code">s</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Time</span> covers the physical factor of time.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Torque</td>
                    <td align="left">Zend_Measure_Torque</td>
                    <td align="left">Newton meter | <code class="code">Nm</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Torque</span> covers the physical factor of
                        torque.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Viscosity (dynamic)</td>
                    <td align="left">Zend_Measure_Viscosity_Dynamic</td>
                    <td align="left">Kilogram per meter second | <code class="code">kg/ms</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Viscosity_Dynamic</span> covers the physical
                        factor of viscosity. The weight of the fluid is used as reference point
                        within this class.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Viscosity (kinematic)</td>
                    <td align="left">Zend_Measure_Viscosity_Kinematic</td>
                    <td align="left">Square meter per second | <code class="code">m²/s</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Viscosity_Kinematic</span> covers the physical
                        factor of viscosity. The distance of the flown fluid is used as reference
                        point within this class.
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Volume</td>
                    <td align="left">Zend_Measure_Volume</td>
                    <td align="left">Cubic meter | <code class="code">m³</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Volume</span> covers the physical factor of
                        volume (content).
                    </td>
                </tr>


                <tr valign="middle">
                    <td align="left">Weight</td>
                    <td align="left">Zend_Measure_Weight</td>
                    <td align="left">Kilogram | <code class="code">kg</code></td>

                    <td align="left">
                        <span class="classname">Zend_Measure_Weight</span> covers the physical factor of
                        weight.
                    </td>
                </tr>

            </tbody>
        
    </table>


    <div class="section" id="zend.measure.types.binary"><div class="info"><h1 class="title">Hints for Zend_Measure_Binary</h1></div>
        

        <p class="para">
            Some popular binary conventions, include terms like kilo-, mega-, giga, etc. in normal
            language use imply base 10, such as 1000 or 10³. However, in the binary format for
            computers these terms have to be seen for a conversion factor of 1024 instead of 1000.
            To preclude confusions a few years ago the notation BI was introduced. Instead of
            kilobyte, kibibyte for kilo-binary-byte should be used.
        </p>

        <p class="para">
            In the class BINARY both notations can be found, such as <code class="code">KILOBYTE = 1024 - binary
            conputer conversion KIBIBYTE = 1024 - new notation KILO_BINARY_BYTE = 1024 - new</code>,
            or the notation, long format
            <code class="code">KILOBYTE_SI = 1000 - SI notation for kilo (1000)</code>. DVDs for example are
            marked with the SI-notation, but almost all harddisks are marked in computer binary
            notation.
        </p>
    </div>

    <div class="section" id="zend.measure.types.decimal"><div class="info"><h1 class="title">Hints for Zend_Measure_Number</h1></div>
        

        <p class="para">
            The best known number format is the decimal system. Additionally this class supports the
            octal system, the hexadecimal system, the binary system, the roman number system and
            some other less popular systems. Note that only the decimal part of numbers is handled.
            Any fractional part will be stripped.
        </p>
    </div>

    <div class="section" id="zend.measure.types.roman"><div class="info"><h1 class="title">Roman numbers</h1></div>
        

        <p class="para">
            For the roman number system digits greater 4000 are supported. In reality these digits
            are shown with a crossbeam on top of the digit. As the crossbeam can not be shown within
            the computer, an underline has to be used instead of it.
        </p>

        <pre class="programlisting brush: php">
$great = &#039;_X&#039;;
$locale = new Zend_Locale(&#039;en&#039;);
$unit = new Zend_Measure_Number($great,Zend_Measure_Number::ROMAN, $locale);

// convert to the decimal system
echo $unit-&gt;convertTo(Zend_Measure_Number::DECIMAL);
</pre>

    </div>
</div>
        <hr />

            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.measure.edit.html">Manipulating Measurements</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.measure.html">Zend_Measure</a></span><br />
                        <span class="home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.memory.html">Zend_Memory</a></div>
                    </td>
                </tr>
            </table>
</td>
        <td style="font-size: smaller;" width="15%"> <style type="text/css">
#leftbar {
	float: left;
	width: 186px;
	padding: 5px;
	font-size: smaller;
}
ul.toc {
	margin: 0px 5px 5px 5px;
	padding: 0px;
}
ul.toc li {
	font-size: 85%;
	margin: 1px 0 1px 1px;
	padding: 1px 0 1px 11px;
	list-style-type: none;
	background-repeat: no-repeat;
	background-position: center left;
}
ul.toc li.header {
	font-size: 115%;
	padding: 5px 0px 5px 11px;
	border-bottom: 1px solid #cccccc;
	margin-bottom: 5px;
}
ul.toc li.active {
	font-weight: bold;
}
ul.toc li a {
	text-decoration: none;
}
ul.toc li a:hover {
	text-decoration: underline;
}
</style>
 <ul class="toc">
  <li class="header home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></li>
  <li class="header up"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></li>
  <li class="header up"><a href="reference.html">Refer&ecirc;ncia do Zend Framework</a></li>
  <li class="header up"><a href="zend.measure.html">Zend_Measure</a></li>
  <li><a href="zend.measure.introduction.html">Introduction</a></li>
  <li><a href="zend.measure.creation.html">Creation of Measurements</a></li>
  <li><a href="zend.measure.output.html">Outputting measurements</a></li>
  <li><a href="zend.measure.edit.html">Manipulating Measurements</a></li>
  <li class="active"><a href="zend.measure.types.html">Types of measurements</a></li>
 </ul>
 </td>
    </tr>
</table>

<script type="text/javascript" src="../js/shCore.js"></script>
<script type="text/javascript" src="../js/shAutoloader.js"></script>
<script type="text/javascript" src="../js/main.js"></script>

</body>
</html>